//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension WorkSpacesWeb {
    // MARK: Enums

    public enum BrowserType: String, CustomStringConvertible, Codable, _SotoSendable {
        case chrome = "Chrome"
        public var description: String { return self.rawValue }
    }

    public enum EnabledType: String, CustomStringConvertible, Codable, _SotoSendable {
        case disabled = "Disabled"
        case enabled = "Enabled"
        public var description: String { return self.rawValue }
    }

    public enum IdentityProviderType: String, CustomStringConvertible, Codable, _SotoSendable {
        case facebook = "Facebook"
        case google = "Google"
        case loginWithAmazon = "LoginWithAmazon"
        case oidc = "OIDC"
        case saml = "SAML"
        case signInWithApple = "SignInWithApple"
        public var description: String { return self.rawValue }
    }

    public enum PortalStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "Active"
        case incomplete = "Incomplete"
        case pending = "Pending"
        public var description: String { return self.rawValue }
    }

    public enum RendererType: String, CustomStringConvertible, Codable, _SotoSendable {
        case appStream = "AppStream"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AssociateBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "browserSettingsArn", location: .querystring("browserSettingsArn")),
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the browser settings.
        public let browserSettingsArn: String
        /// The ARN of the web portal.
        public let portalArn: String

        public init(browserSettingsArn: String, portalArn: String) {
            self.browserSettingsArn = browserSettingsArn
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, max: 2048)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, min: 20)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateBrowserSettingsResponse: AWSDecodableShape {
        /// The ARN of the browser settings.
        public let browserSettingsArn: String
        /// The ARN of the web portal.
        public let portalArn: String

        public init(browserSettingsArn: String, portalArn: String) {
            self.browserSettingsArn = browserSettingsArn
            self.portalArn = portalArn
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettingsArn
            case portalArn
        }
    }

    public struct AssociateNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "networkSettingsArn", location: .querystring("networkSettingsArn")),
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the network settings.
        public let networkSettingsArn: String
        /// The ARN of the web portal.
        public let portalArn: String

        public init(networkSettingsArn: String, portalArn: String) {
            self.networkSettingsArn = networkSettingsArn
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, max: 2048)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, min: 20)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateNetworkSettingsResponse: AWSDecodableShape {
        /// The ARN of the network settings.
        public let networkSettingsArn: String
        /// The ARN of the web portal.
        public let portalArn: String

        public init(networkSettingsArn: String, portalArn: String) {
            self.networkSettingsArn = networkSettingsArn
            self.portalArn = portalArn
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettingsArn
            case portalArn
        }
    }

    public struct AssociateTrustStoreRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn")),
            AWSMemberEncoding(label: "trustStoreArn", location: .querystring("trustStoreArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(portalArn: String, trustStoreArn: String) {
            self.portalArn = portalArn
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateTrustStoreResponse: AWSDecodableShape {
        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(portalArn: String, trustStoreArn: String) {
            self.portalArn = portalArn
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case portalArn
            case trustStoreArn
        }
    }

    public struct AssociateUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn")),
            AWSMemberEncoding(label: "userAccessLoggingSettingsArn", location: .querystring("userAccessLoggingSettingsArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(portalArn: String, userAccessLoggingSettingsArn: String) {
            self.portalArn = portalArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, max: 2048)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, min: 20)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateUserAccessLoggingSettingsResponse: AWSDecodableShape {
        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(portalArn: String, userAccessLoggingSettingsArn: String) {
            self.portalArn = portalArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case portalArn
            case userAccessLoggingSettingsArn
        }
    }

    public struct AssociateUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn")),
            AWSMemberEncoding(label: "userSettingsArn", location: .querystring("userSettingsArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(portalArn: String, userSettingsArn: String) {
            self.portalArn = portalArn
            self.userSettingsArn = userSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, max: 2048)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, min: 20)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateUserSettingsResponse: AWSDecodableShape {
        /// The ARN of the web portal.
        public let portalArn: String
        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(portalArn: String, userSettingsArn: String) {
            self.portalArn = portalArn
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case portalArn
            case userSettingsArn
        }
    }

    public struct BrowserSettings: AWSDecodableShape {
        /// A list of web portal ARNs that this browser settings is associated with.
        public let associatedPortalArns: [String]?
        /// A JSON string containing Chrome Enterprise policies that will be applied to all streaming sessions.
        public let browserPolicy: String?
        /// The ARN of the browser settings.
        public let browserSettingsArn: String

        public init(associatedPortalArns: [String]? = nil, browserPolicy: String? = nil, browserSettingsArn: String) {
            self.associatedPortalArns = associatedPortalArns
            self.browserPolicy = browserPolicy
            self.browserSettingsArn = browserSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case associatedPortalArns
            case browserPolicy
            case browserSettingsArn
        }
    }

    public struct BrowserSettingsSummary: AWSDecodableShape {
        /// The ARN of the browser settings.
        public let browserSettingsArn: String?

        public init(browserSettingsArn: String? = nil) {
            self.browserSettingsArn = browserSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettingsArn
        }
    }

    public struct Certificate: AWSDecodableShape {
        /// The body of the certificate.
        public let body: AWSBase64Data?
        /// The entity that issued the certificate.
        public let issuer: String?
        /// The certificate is not valid after this date.
        public let notValidAfter: Date?
        /// The certificate is not valid before this date.
        public let notValidBefore: Date?
        /// The entity the certificate belongs to.
        public let subject: String?
        /// A hexadecimal identifier for the certificate.
        public let thumbprint: String?

        public init(body: AWSBase64Data? = nil, issuer: String? = nil, notValidAfter: Date? = nil, notValidBefore: Date? = nil, subject: String? = nil, thumbprint: String? = nil) {
            self.body = body
            self.issuer = issuer
            self.notValidAfter = notValidAfter
            self.notValidBefore = notValidBefore
            self.subject = subject
            self.thumbprint = thumbprint
        }

        private enum CodingKeys: String, CodingKey {
            case body
            case issuer
            case notValidAfter
            case notValidBefore
            case subject
            case thumbprint
        }
    }

    public struct CertificateSummary: AWSDecodableShape {
        /// The entity that issued the certificate.
        public let issuer: String?
        /// The certificate is not valid after this date.
        public let notValidAfter: Date?
        /// The certificate is not valid before this date.
        public let notValidBefore: Date?
        /// The entity the certificate belongs to.
        public let subject: String?
        /// A hexadecimal identifier for the certificate.
        public let thumbprint: String?

        public init(issuer: String? = nil, notValidAfter: Date? = nil, notValidBefore: Date? = nil, subject: String? = nil, thumbprint: String? = nil) {
            self.issuer = issuer
            self.notValidAfter = notValidAfter
            self.notValidBefore = notValidBefore
            self.subject = subject
            self.thumbprint = thumbprint
        }

        private enum CodingKeys: String, CodingKey {
            case issuer
            case notValidAfter
            case notValidBefore
            case subject
            case thumbprint
        }
    }

    public struct CreateBrowserSettingsRequest: AWSEncodableShape {
        /// Additional encryption context of the browser settings.
        public let additionalEncryptionContext: [String: String]?
        /// A JSON string containing Chrome Enterprise policies that will be applied to all streaming sessions.
        public let browserPolicy: String
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The custom managed key of the browser settings.
        public let customerManagedKey: String?
        /// The tags to add to the browser settings resource. A tag is a key-value pair.
        public let tags: [Tag]?

        public init(additionalEncryptionContext: [String: String]? = nil, browserPolicy: String, clientToken: String? = CreateBrowserSettingsRequest.idempotencyToken(), customerManagedKey: String? = nil, tags: [Tag]? = nil) {
            self.additionalEncryptionContext = additionalEncryptionContext
            self.browserPolicy = browserPolicy
            self.clientToken = clientToken
            self.customerManagedKey = customerManagedKey
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.additionalEncryptionContext?.forEach {
                try validate($0.key, name: "additionalEncryptionContext.key", parent: name, max: 131_072)
                try validate($0.key, name: "additionalEncryptionContext.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "additionalEncryptionContext[\"\($0.key)\"]", parent: name, max: 131_072)
                try validate($0.value, name: "additionalEncryptionContext[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, max: 131_072)
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, min: 2)
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, pattern: "\\{[\\S\\s]*\\}\\s*")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, max: 2048)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, min: 20)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:kms:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:key\\/[a-zA-Z0-9-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case additionalEncryptionContext
            case browserPolicy
            case clientToken
            case customerManagedKey
            case tags
        }
    }

    public struct CreateBrowserSettingsResponse: AWSDecodableShape {
        /// The ARN of the browser settings.
        public let browserSettingsArn: String

        public init(browserSettingsArn: String) {
            self.browserSettingsArn = browserSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettingsArn
        }
    }

    public struct CreateIdentityProviderRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The identity provider details. The following list describes the provider detail keys for each identity provider type.    For Google and Login with Amazon:          client_id     client_secret     authorize_scopes      For Facebook:          client_id     client_secret     authorize_scopes     api_version      For Sign in with Apple:          client_id     team_id     key_id     private_key     authorize_scopes      For OIDC providers:          client_id     client_secret     attributes_request_method     oidc_issuer     authorize_scopes     authorize_url if not available from discovery URL specified by oidc_issuer key     token_url if not available from discovery URL specified by oidc_issuer key     attributes_url if not available from discovery URL specified by oidc_issuer key     jwks_uri if not available from discovery URL specified by oidc_issuer key      For SAML providers:          MetadataFile OR MetadataURL     IDPSignout (boolean)  optional
        public let identityProviderDetails: [String: String]
        /// The identity provider name.
        public let identityProviderName: String
        /// The identity provider type.
        public let identityProviderType: IdentityProviderType
        /// The ARN of the web portal.
        public let portalArn: String

        public init(clientToken: String? = CreateIdentityProviderRequest.idempotencyToken(), identityProviderDetails: [String: String], identityProviderName: String, identityProviderType: IdentityProviderType, portalArn: String) {
            self.clientToken = clientToken
            self.identityProviderDetails = identityProviderDetails
            self.identityProviderName = identityProviderName
            self.identityProviderType = identityProviderType
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.identityProviderDetails.forEach {
                try validate($0.key, name: "identityProviderDetails.key", parent: name, max: 131_072)
                try validate($0.key, name: "identityProviderDetails.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "identityProviderDetails[\"\($0.key)\"]", parent: name, max: 131_072)
                try validate($0.value, name: "identityProviderDetails[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, max: 32)
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, min: 1)
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, pattern: "^[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+$")
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case identityProviderDetails
            case identityProviderName
            case identityProviderType
            case portalArn
        }
    }

    public struct CreateIdentityProviderResponse: AWSDecodableShape {
        /// The ARN of the identity provider.
        public let identityProviderArn: String

        public init(identityProviderArn: String) {
            self.identityProviderArn = identityProviderArn
        }

        private enum CodingKeys: String, CodingKey {
            case identityProviderArn
        }
    }

    public struct CreateNetworkSettingsRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// One or more security groups used to control access from streaming instances to your VPC.
        public let securityGroupIds: [String]
        /// The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.
        public let subnetIds: [String]
        /// The tags to add to the network settings resource. A tag is a key-value pair.
        public let tags: [Tag]?
        /// The VPC that streaming instances will connect to.
        public let vpcId: String

        public init(clientToken: String? = CreateNetworkSettingsRequest.idempotencyToken(), securityGroupIds: [String], subnetIds: [String], tags: [Tag]? = nil, vpcId: String) {
            self.clientToken = clientToken
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
            self.tags = tags
            self.vpcId = vpcId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 128)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^[\\w+\\-]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 32)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^subnet-([0-9a-f]{8}|[0-9a-f]{17})$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 3)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 2)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.validate(self.vpcId, name: "vpcId", parent: name, max: 255)
            try self.validate(self.vpcId, name: "vpcId", parent: name, min: 1)
            try self.validate(self.vpcId, name: "vpcId", parent: name, pattern: "^vpc-[0-9a-z]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case securityGroupIds
            case subnetIds
            case tags
            case vpcId
        }
    }

    public struct CreateNetworkSettingsResponse: AWSDecodableShape {
        /// The ARN of the network settings.
        public let networkSettingsArn: String

        public init(networkSettingsArn: String) {
            self.networkSettingsArn = networkSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettingsArn
        }
    }

    public struct CreatePortalRequest: AWSEncodableShape {
        /// The additional encryption context of the portal.
        public let additionalEncryptionContext: [String: String]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The customer managed key of the web portal.
        public let customerManagedKey: String?
        /// The name of the web portal. This is not visible to users who log into the web portal.
        public let displayName: String?
        /// The tags to add to the web portal. A tag is a key-value pair.
        public let tags: [Tag]?

        public init(additionalEncryptionContext: [String: String]? = nil, clientToken: String? = CreatePortalRequest.idempotencyToken(), customerManagedKey: String? = nil, displayName: String? = nil, tags: [Tag]? = nil) {
            self.additionalEncryptionContext = additionalEncryptionContext
            self.clientToken = clientToken
            self.customerManagedKey = customerManagedKey
            self.displayName = displayName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.additionalEncryptionContext?.forEach {
                try validate($0.key, name: "additionalEncryptionContext.key", parent: name, max: 131_072)
                try validate($0.key, name: "additionalEncryptionContext.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "additionalEncryptionContext[\"\($0.key)\"]", parent: name, max: 131_072)
                try validate($0.value, name: "additionalEncryptionContext[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, max: 2048)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, min: 20)
            try self.validate(self.customerManagedKey, name: "customerManagedKey", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:kms:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:key\\/[a-zA-Z0-9-]+$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^.+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case additionalEncryptionContext
            case clientToken
            case customerManagedKey
            case displayName
            case tags
        }
    }

    public struct CreatePortalResponse: AWSDecodableShape {
        /// The ARN of the web portal.
        public let portalArn: String
        /// The endpoint URL of the web portal that users access in order to start streaming sessions.
        public let portalEndpoint: String

        public init(portalArn: String, portalEndpoint: String) {
            self.portalArn = portalArn
            self.portalEndpoint = portalEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case portalArn
            case portalEndpoint
        }
    }

    public struct CreateTrustStoreRequest: AWSEncodableShape {
        /// A list of CA certificates to be added to the trust store.
        public let certificateList: [AWSBase64Data]
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The tags to add to the trust store. A tag is a key-value pair.
        public let tags: [Tag]?

        public init(certificateList: [AWSBase64Data], clientToken: String? = CreateTrustStoreRequest.idempotencyToken(), tags: [Tag]? = nil) {
            self.certificateList = certificateList
            self.clientToken = clientToken
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case certificateList
            case clientToken
            case tags
        }
    }

    public struct CreateTrustStoreResponse: AWSDecodableShape {
        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(trustStoreArn: String) {
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case trustStoreArn
        }
    }

    public struct CreateUserAccessLoggingSettingsRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the Kinesis stream.
        public let kinesisStreamArn: String
        /// The tags to add to the user settings resource. A tag is a key-value pair.
        public let tags: [Tag]?

        public init(clientToken: String? = CreateUserAccessLoggingSettingsRequest.idempotencyToken(), kinesisStreamArn: String, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.kinesisStreamArn = kinesisStreamArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, max: 2048)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, min: 20)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:kinesis:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:stream/.+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case kinesisStreamArn
            case tags
        }
    }

    public struct CreateUserAccessLoggingSettingsResponse: AWSDecodableShape {
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(userAccessLoggingSettingsArn: String) {
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case userAccessLoggingSettingsArn
        }
    }

    public struct CreateUserSettingsRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// Specifies whether the user can copy text from the streaming session to the local device.
        public let copyAllowed: EnabledType
        /// The amount of time that a streaming session remains active after users disconnect.
        public let disconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can download files from the streaming session to the local device.
        public let downloadAllowed: EnabledType
        /// The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.
        public let idleDisconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can paste text from the local device to the streaming session.
        public let pasteAllowed: EnabledType
        /// Specifies whether the user can print to the local device.
        public let printAllowed: EnabledType
        /// The tags to add to the user settings resource. A tag is a key-value pair.
        public let tags: [Tag]?
        /// Specifies whether the user can upload files from the local device to the streaming session.
        public let uploadAllowed: EnabledType

        public init(clientToken: String? = CreateUserSettingsRequest.idempotencyToken(), copyAllowed: EnabledType, disconnectTimeoutInMinutes: Int? = nil, downloadAllowed: EnabledType, idleDisconnectTimeoutInMinutes: Int? = nil, pasteAllowed: EnabledType, printAllowed: EnabledType, tags: [Tag]? = nil, uploadAllowed: EnabledType) {
            self.clientToken = clientToken
            self.copyAllowed = copyAllowed
            self.disconnectTimeoutInMinutes = disconnectTimeoutInMinutes
            self.downloadAllowed = downloadAllowed
            self.idleDisconnectTimeoutInMinutes = idleDisconnectTimeoutInMinutes
            self.pasteAllowed = pasteAllowed
            self.printAllowed = printAllowed
            self.tags = tags
            self.uploadAllowed = uploadAllowed
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.disconnectTimeoutInMinutes, name: "disconnectTimeoutInMinutes", parent: name, max: 600)
            try self.validate(self.disconnectTimeoutInMinutes, name: "disconnectTimeoutInMinutes", parent: name, min: 1)
            try self.validate(self.idleDisconnectTimeoutInMinutes, name: "idleDisconnectTimeoutInMinutes", parent: name, max: 60)
            try self.validate(self.idleDisconnectTimeoutInMinutes, name: "idleDisconnectTimeoutInMinutes", parent: name, min: 0)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case copyAllowed
            case disconnectTimeoutInMinutes
            case downloadAllowed
            case idleDisconnectTimeoutInMinutes
            case pasteAllowed
            case printAllowed
            case tags
            case uploadAllowed
        }
    }

    public struct CreateUserSettingsResponse: AWSDecodableShape {
        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(userSettingsArn: String) {
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case userSettingsArn
        }
    }

    public struct DeleteBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "browserSettingsArn", location: .uri("browserSettingsArn"))
        ]

        /// The ARN of the browser settings.
        public let browserSettingsArn: String

        public init(browserSettingsArn: String) {
            self.browserSettingsArn = browserSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, max: 2048)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, min: 20)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBrowserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteIdentityProviderRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "identityProviderArn", location: .uri("identityProviderArn"))
        ]

        /// The ARN of the identity provider.
        public let identityProviderArn: String

        public init(identityProviderArn: String) {
            self.identityProviderArn = identityProviderArn
        }

        public func validate(name: String) throws {
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, max: 2048)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, min: 20)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteIdentityProviderResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "networkSettingsArn", location: .uri("networkSettingsArn"))
        ]

        /// The ARN of the network settings.
        public let networkSettingsArn: String

        public init(networkSettingsArn: String) {
            self.networkSettingsArn = networkSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, max: 2048)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, min: 20)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteNetworkSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePortalRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePortalResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTrustStoreRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "trustStoreArn", location: .uri("trustStoreArn"))
        ]

        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(trustStoreArn: String) {
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteTrustStoreResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userAccessLoggingSettingsArn", location: .uri("userAccessLoggingSettingsArn"))
        ]

        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(userAccessLoggingSettingsArn: String) {
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, max: 2048)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, min: 20)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUserAccessLoggingSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userSettingsArn", location: .uri("userSettingsArn"))
        ]

        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(userSettingsArn: String) {
            self.userSettingsArn = userSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, max: 2048)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, min: 20)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateBrowserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateNetworkSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateTrustStoreRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateTrustStoreResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateUserAccessLoggingSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GetBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "browserSettingsArn", location: .uri("browserSettingsArn"))
        ]

        /// The ARN of the browser settings.
        public let browserSettingsArn: String

        public init(browserSettingsArn: String) {
            self.browserSettingsArn = browserSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, max: 2048)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, min: 20)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBrowserSettingsResponse: AWSDecodableShape {
        /// The browser settings.
        public let browserSettings: BrowserSettings?

        public init(browserSettings: BrowserSettings? = nil) {
            self.browserSettings = browserSettings
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettings
        }
    }

    public struct GetIdentityProviderRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "identityProviderArn", location: .uri("identityProviderArn"))
        ]

        /// The ARN of the identity provider.
        public let identityProviderArn: String

        public init(identityProviderArn: String) {
            self.identityProviderArn = identityProviderArn
        }

        public func validate(name: String) throws {
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, max: 2048)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, min: 20)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetIdentityProviderResponse: AWSDecodableShape {
        /// The identity provider.
        public let identityProvider: IdentityProvider?

        public init(identityProvider: IdentityProvider? = nil) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider
        }
    }

    public struct GetNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "networkSettingsArn", location: .uri("networkSettingsArn"))
        ]

        /// The ARN of the network settings.
        public let networkSettingsArn: String

        public init(networkSettingsArn: String) {
            self.networkSettingsArn = networkSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, max: 2048)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, min: 20)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetNetworkSettingsResponse: AWSDecodableShape {
        /// The network settings.
        public let networkSettings: NetworkSettings?

        public init(networkSettings: NetworkSettings? = nil) {
            self.networkSettings = networkSettings
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettings
        }
    }

    public struct GetPortalRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPortalResponse: AWSDecodableShape {
        /// The web portal.
        public let portal: Portal?

        public init(portal: Portal? = nil) {
            self.portal = portal
        }

        private enum CodingKeys: String, CodingKey {
            case portal
        }
    }

    public struct GetPortalServiceProviderMetadataRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The ARN of the web portal.
        public let portalArn: String

        public init(portalArn: String) {
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPortalServiceProviderMetadataResponse: AWSDecodableShape {
        /// The ARN of the web portal.
        public let portalArn: String
        /// The service provider SAML metadata.
        public let serviceProviderSamlMetadata: String?

        public init(portalArn: String, serviceProviderSamlMetadata: String? = nil) {
            self.portalArn = portalArn
            self.serviceProviderSamlMetadata = serviceProviderSamlMetadata
        }

        private enum CodingKeys: String, CodingKey {
            case portalArn
            case serviceProviderSamlMetadata
        }
    }

    public struct GetTrustStoreCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thumbprint", location: .querystring("thumbprint")),
            AWSMemberEncoding(label: "trustStoreArn", location: .uri("trustStoreArn"))
        ]

        /// The thumbprint of the trust store certificate.
        public let thumbprint: String
        /// The ARN of the trust store certificate.
        public let trustStoreArn: String

        public init(thumbprint: String, trustStoreArn: String) {
            self.thumbprint = thumbprint
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.validate(self.thumbprint, name: "thumbprint", parent: name, max: 64)
            try self.validate(self.thumbprint, name: "thumbprint", parent: name, min: 64)
            try self.validate(self.thumbprint, name: "thumbprint", parent: name, pattern: "^[A-Fa-f0-9]{64}$")
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTrustStoreCertificateResponse: AWSDecodableShape {
        /// The certificate of the trust store certificate.
        public let certificate: Certificate?
        /// The ARN of the trust store certificate.
        public let trustStoreArn: String?

        public init(certificate: Certificate? = nil, trustStoreArn: String? = nil) {
            self.certificate = certificate
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case certificate
            case trustStoreArn
        }
    }

    public struct GetTrustStoreRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "trustStoreArn", location: .uri("trustStoreArn"))
        ]

        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(trustStoreArn: String) {
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTrustStoreResponse: AWSDecodableShape {
        /// The trust store.
        public let trustStore: TrustStore?

        public init(trustStore: TrustStore? = nil) {
            self.trustStore = trustStore
        }

        private enum CodingKeys: String, CodingKey {
            case trustStore
        }
    }

    public struct GetUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userAccessLoggingSettingsArn", location: .uri("userAccessLoggingSettingsArn"))
        ]

        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(userAccessLoggingSettingsArn: String) {
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, max: 2048)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, min: 20)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUserAccessLoggingSettingsResponse: AWSDecodableShape {
        /// The user access logging settings.
        public let userAccessLoggingSettings: UserAccessLoggingSettings?

        public init(userAccessLoggingSettings: UserAccessLoggingSettings? = nil) {
            self.userAccessLoggingSettings = userAccessLoggingSettings
        }

        private enum CodingKeys: String, CodingKey {
            case userAccessLoggingSettings
        }
    }

    public struct GetUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userSettingsArn", location: .uri("userSettingsArn"))
        ]

        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(userSettingsArn: String) {
            self.userSettingsArn = userSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, max: 2048)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, min: 20)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUserSettingsResponse: AWSDecodableShape {
        /// The user settings.
        public let userSettings: UserSettings?

        public init(userSettings: UserSettings? = nil) {
            self.userSettings = userSettings
        }

        private enum CodingKeys: String, CodingKey {
            case userSettings
        }
    }

    public struct IdentityProvider: AWSDecodableShape {
        /// The ARN of the identity provider.
        public let identityProviderArn: String
        /// The identity provider details. The following list describes the provider detail keys for each identity provider type.    For Google and Login with Amazon:          client_id     client_secret     authorize_scopes      For Facebook:          client_id     client_secret     authorize_scopes     api_version      For Sign in with Apple:          client_id     team_id     key_id     private_key     authorize_scopes      For OIDC providers:          client_id     client_secret     attributes_request_method     oidc_issuer     authorize_scopes     authorize_url if not available from discovery URL specified by oidc_issuer key     token_url if not available from discovery URL specified by oidc_issuer key     attributes_url if not available from discovery URL specified by oidc_issuer key     jwks_uri if not available from discovery URL specified by oidc_issuer key      For SAML providers:          MetadataFile OR MetadataURL     IDPSignout optional
        public let identityProviderDetails: [String: String]?
        /// The identity provider name.
        public let identityProviderName: String?
        /// The identity provider type.
        public let identityProviderType: IdentityProviderType?

        public init(identityProviderArn: String, identityProviderDetails: [String: String]? = nil, identityProviderName: String? = nil, identityProviderType: IdentityProviderType? = nil) {
            self.identityProviderArn = identityProviderArn
            self.identityProviderDetails = identityProviderDetails
            self.identityProviderName = identityProviderName
            self.identityProviderType = identityProviderType
        }

        private enum CodingKeys: String, CodingKey {
            case identityProviderArn
            case identityProviderDetails
            case identityProviderName
            case identityProviderType
        }
    }

    public struct IdentityProviderSummary: AWSDecodableShape {
        /// The ARN of the identity provider.
        public let identityProviderArn: String?
        /// The identity provider name.
        public let identityProviderName: String?
        /// The identity provider type.
        public let identityProviderType: IdentityProviderType?

        public init(identityProviderArn: String? = nil, identityProviderName: String? = nil, identityProviderType: IdentityProviderType? = nil) {
            self.identityProviderArn = identityProviderArn
            self.identityProviderName = identityProviderName
            self.identityProviderType = identityProviderType
        }

        private enum CodingKeys: String, CodingKey {
            case identityProviderArn
            case identityProviderName
            case identityProviderType
        }
    }

    public struct ListBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBrowserSettingsResponse: AWSDecodableShape {
        /// The browser settings.
        public let browserSettings: [BrowserSettingsSummary]?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(browserSettings: [BrowserSettingsSummary]? = nil, nextToken: String? = nil) {
            self.browserSettings = browserSettings
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettings
            case nextToken
        }
    }

    public struct ListIdentityProvidersRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The ARN of the web portal.
        public let portalArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, portalArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIdentityProvidersResponse: AWSDecodableShape {
        /// The identity providers.
        public let identityProviders: [IdentityProviderSummary]?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(identityProviders: [IdentityProviderSummary]? = nil, nextToken: String? = nil) {
            self.identityProviders = identityProviders
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case identityProviders
            case nextToken
        }
    }

    public struct ListNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListNetworkSettingsResponse: AWSDecodableShape {
        /// The network settings.
        public let networkSettings: [NetworkSettingsSummary]?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(networkSettings: [NetworkSettingsSummary]? = nil, nextToken: String? = nil) {
            self.networkSettings = networkSettings
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettings
            case nextToken
        }
    }

    public struct ListPortalsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPortalsResponse: AWSDecodableShape {
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The portals in the list.
        public let portals: [PortalSummary]?

        public init(nextToken: String? = nil, portals: [PortalSummary]? = nil) {
            self.nextToken = nextToken
            self.portals = portals
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case portals
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The ARN of the resource.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags of the resource.
        public let tags: [Tag]?

        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListTrustStoreCertificatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "trustStoreArn", location: .uri("trustStoreArn"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The ARN of the trust store
        public let trustStoreArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, trustStoreArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTrustStoreCertificatesResponse: AWSDecodableShape {
        /// The certificate list.
        public let certificateList: [CertificateSummary]?
        /// The pagination token used to retrieve the next page of results for this operation.&gt;
        public let nextToken: String?
        /// The ARN of the trust store.
        public let trustStoreArn: String?

        public init(certificateList: [CertificateSummary]? = nil, nextToken: String? = nil, trustStoreArn: String? = nil) {
            self.certificateList = certificateList
            self.nextToken = nextToken
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case certificateList
            case nextToken
            case trustStoreArn
        }
    }

    public struct ListTrustStoresRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTrustStoresResponse: AWSDecodableShape {
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The trust stores.
        public let trustStores: [TrustStoreSummary]?

        public init(nextToken: String? = nil, trustStores: [TrustStoreSummary]? = nil) {
            self.nextToken = nextToken
            self.trustStores = trustStores
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case trustStores
        }
    }

    public struct ListUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListUserAccessLoggingSettingsResponse: AWSDecodableShape {
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The user access logging settings.
        public let userAccessLoggingSettings: [UserAccessLoggingSettingsSummary]?

        public init(nextToken: String? = nil, userAccessLoggingSettings: [UserAccessLoggingSettingsSummary]? = nil) {
            self.nextToken = nextToken
            self.userAccessLoggingSettings = userAccessLoggingSettings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case userAccessLoggingSettings
        }
    }

    public struct ListUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to be included in the next page.
        public let maxResults: Int?
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListUserSettingsResponse: AWSDecodableShape {
        /// The pagination token used to retrieve the next page of results for this operation.
        public let nextToken: String?
        /// The user settings.
        public let userSettings: [UserSettingsSummary]?

        public init(nextToken: String? = nil, userSettings: [UserSettingsSummary]? = nil) {
            self.nextToken = nextToken
            self.userSettings = userSettings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case userSettings
        }
    }

    public struct NetworkSettings: AWSDecodableShape {
        /// A list of web portal ARNs that this network settings is associated with.
        public let associatedPortalArns: [String]?
        /// The ARN of the network settings.
        public let networkSettingsArn: String
        /// One or more security groups used to control access from streaming instances to your VPC.
        public let securityGroupIds: [String]?
        /// The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.
        public let subnetIds: [String]?
        /// The VPC that streaming instances will connect to.
        public let vpcId: String?

        public init(associatedPortalArns: [String]? = nil, networkSettingsArn: String, securityGroupIds: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.associatedPortalArns = associatedPortalArns
            self.networkSettingsArn = networkSettingsArn
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case associatedPortalArns
            case networkSettingsArn
            case securityGroupIds
            case subnetIds
            case vpcId
        }
    }

    public struct NetworkSettingsSummary: AWSDecodableShape {
        /// The ARN of the network settings.
        public let networkSettingsArn: String?
        /// The VPC ID of the network settings.
        public let vpcId: String?

        public init(networkSettingsArn: String? = nil, vpcId: String? = nil) {
            self.networkSettingsArn = networkSettingsArn
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettingsArn
            case vpcId
        }
    }

    public struct Portal: AWSDecodableShape {
        /// The ARN of the browser settings that is associated with this web portal.
        public let browserSettingsArn: String?
        /// The browser that users see when using a streaming session.
        public let browserType: BrowserType?
        /// The creation date of the web portal.
        public let creationDate: Date?
        /// The name of the web portal.
        public let displayName: String?
        /// The ARN of the network settings that is associated with the web portal.
        public let networkSettingsArn: String?
        /// The ARN of the web portal.
        public let portalArn: String?
        /// The endpoint URL of the web portal that users access in order to start streaming sessions.
        public let portalEndpoint: String?
        /// The status of the web portal.
        public let portalStatus: PortalStatus?
        /// The renderer that is used in streaming sessions.
        public let rendererType: RendererType?
        /// A message that explains why the web portal is in its current status.
        public let statusReason: String?
        /// The ARN of the trust store that is associated with the web portal.
        public let trustStoreArn: String?
        /// The ARN of the user access logging settings that is associated with the web portal.
        public let userAccessLoggingSettingsArn: String?
        /// The ARN of the user settings that is associated with the web portal.
        public let userSettingsArn: String?

        public init(browserSettingsArn: String? = nil, browserType: BrowserType? = nil, creationDate: Date? = nil, displayName: String? = nil, networkSettingsArn: String? = nil, portalArn: String? = nil, portalEndpoint: String? = nil, portalStatus: PortalStatus? = nil, rendererType: RendererType? = nil, statusReason: String? = nil, trustStoreArn: String? = nil, userAccessLoggingSettingsArn: String? = nil, userSettingsArn: String? = nil) {
            self.browserSettingsArn = browserSettingsArn
            self.browserType = browserType
            self.creationDate = creationDate
            self.displayName = displayName
            self.networkSettingsArn = networkSettingsArn
            self.portalArn = portalArn
            self.portalEndpoint = portalEndpoint
            self.portalStatus = portalStatus
            self.rendererType = rendererType
            self.statusReason = statusReason
            self.trustStoreArn = trustStoreArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettingsArn
            case browserType
            case creationDate
            case displayName
            case networkSettingsArn
            case portalArn
            case portalEndpoint
            case portalStatus
            case rendererType
            case statusReason
            case trustStoreArn
            case userAccessLoggingSettingsArn
            case userSettingsArn
        }
    }

    public struct PortalSummary: AWSDecodableShape {
        /// The ARN of the browser settings that is associated with the web portal.
        public let browserSettingsArn: String?
        /// The browser type of the web portal.
        public let browserType: BrowserType?
        /// The creation date of the web portal.
        public let creationDate: Date?
        /// The name of the web portal.
        public let displayName: String?
        /// The ARN of the network settings that is associated with the web portal.
        public let networkSettingsArn: String?
        /// The ARN of the web portal.
        public let portalArn: String?
        /// The endpoint URL of the web portal that users access in order to start streaming sessions.
        public let portalEndpoint: String?
        /// The status of the web portal.
        public let portalStatus: PortalStatus?
        /// The renderer that is used in streaming sessions.
        public let rendererType: RendererType?
        /// The ARN of the trust that is associated with this web portal.
        public let trustStoreArn: String?
        /// The ARN of the user access logging settings that is associated with the web portal.
        public let userAccessLoggingSettingsArn: String?
        /// The ARN of the user settings that is associated with the web portal.
        public let userSettingsArn: String?

        public init(browserSettingsArn: String? = nil, browserType: BrowserType? = nil, creationDate: Date? = nil, displayName: String? = nil, networkSettingsArn: String? = nil, portalArn: String? = nil, portalEndpoint: String? = nil, portalStatus: PortalStatus? = nil, rendererType: RendererType? = nil, trustStoreArn: String? = nil, userAccessLoggingSettingsArn: String? = nil, userSettingsArn: String? = nil) {
            self.browserSettingsArn = browserSettingsArn
            self.browserType = browserType
            self.creationDate = creationDate
            self.displayName = displayName
            self.networkSettingsArn = networkSettingsArn
            self.portalArn = portalArn
            self.portalEndpoint = portalEndpoint
            self.portalStatus = portalStatus
            self.rendererType = rendererType
            self.trustStoreArn = trustStoreArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettingsArn
            case browserType
            case creationDate
            case displayName
            case networkSettingsArn
            case portalArn
            case portalEndpoint
            case portalStatus
            case rendererType
            case trustStoreArn
            case userAccessLoggingSettingsArn
            case userSettingsArn
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of the tag.
        public let key: String
        /// The value of the tag
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the resource.
        public let resourceArn: String
        /// The tags of the resource.
        public let tags: [Tag]

        public init(clientToken: String? = TagResourceRequest.idempotencyToken(), resourceArn: String, tags: [Tag]) {
            self.clientToken = clientToken
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TrustStore: AWSDecodableShape {
        /// A list of web portal ARNs that this trust store is associated with.
        public let associatedPortalArns: [String]?
        /// The ARN of the trust store.
        public let trustStoreArn: String?

        public init(associatedPortalArns: [String]? = nil, trustStoreArn: String? = nil) {
            self.associatedPortalArns = associatedPortalArns
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case associatedPortalArns
            case trustStoreArn
        }
    }

    public struct TrustStoreSummary: AWSDecodableShape {
        /// The ARN of the trust store.
        public let trustStoreArn: String?

        public init(trustStoreArn: String? = nil) {
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case trustStoreArn
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The ARN of the resource.
        public let resourceArn: String
        /// The list of tag keys to remove from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateBrowserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "browserSettingsArn", location: .uri("browserSettingsArn"))
        ]

        /// A JSON string containing Chrome Enterprise policies that will be applied to all streaming sessions.
        public let browserPolicy: String?
        /// The ARN of the browser settings.
        public let browserSettingsArn: String
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?

        public init(browserPolicy: String? = nil, browserSettingsArn: String, clientToken: String? = UpdateBrowserSettingsRequest.idempotencyToken()) {
            self.browserPolicy = browserPolicy
            self.browserSettingsArn = browserSettingsArn
            self.clientToken = clientToken
        }

        public func validate(name: String) throws {
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, max: 131_072)
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, min: 2)
            try self.validate(self.browserPolicy, name: "browserPolicy", parent: name, pattern: "\\{[\\S\\s]*\\}\\s*")
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, max: 2048)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, min: 20)
            try self.validate(self.browserSettingsArn, name: "browserSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case browserPolicy
            case clientToken
        }
    }

    public struct UpdateBrowserSettingsResponse: AWSDecodableShape {
        /// The browser settings.
        public let browserSettings: BrowserSettings

        public init(browserSettings: BrowserSettings) {
            self.browserSettings = browserSettings
        }

        private enum CodingKeys: String, CodingKey {
            case browserSettings
        }
    }

    public struct UpdateIdentityProviderRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "identityProviderArn", location: .uri("identityProviderArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the identity provider.
        public let identityProviderArn: String
        /// The details of the identity provider. The following list describes the provider detail keys for each identity provider type.    For Google and Login with Amazon:          client_id     client_secret     authorize_scopes      For Facebook:          client_id     client_secret     authorize_scopes     api_version      For Sign in with Apple:          client_id     team_id     key_id     private_key     authorize_scopes      For OIDC providers:          client_id     client_secret     attributes_request_method     oidc_issuer     authorize_scopes     authorize_url if not available from discovery URL specified by oidc_issuer key     token_url if not available from discovery URL specified by oidc_issuer key     attributes_url if not available from discovery URL specified by oidc_issuer key     jwks_uri if not available from discovery URL specified by oidc_issuer key      For SAML providers:          MetadataFile OR MetadataURL     IDPSignout (boolean)  optional
        public let identityProviderDetails: [String: String]?
        /// The name of the identity provider.
        public let identityProviderName: String?
        /// The type of the identity provider.
        public let identityProviderType: IdentityProviderType?

        public init(clientToken: String? = UpdateIdentityProviderRequest.idempotencyToken(), identityProviderArn: String, identityProviderDetails: [String: String]? = nil, identityProviderName: String? = nil, identityProviderType: IdentityProviderType? = nil) {
            self.clientToken = clientToken
            self.identityProviderArn = identityProviderArn
            self.identityProviderDetails = identityProviderDetails
            self.identityProviderName = identityProviderName
            self.identityProviderType = identityProviderType
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, max: 2048)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, min: 20)
            try self.validate(self.identityProviderArn, name: "identityProviderArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.identityProviderDetails?.forEach {
                try validate($0.key, name: "identityProviderDetails.key", parent: name, max: 131_072)
                try validate($0.key, name: "identityProviderDetails.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "identityProviderDetails[\"\($0.key)\"]", parent: name, max: 131_072)
                try validate($0.value, name: "identityProviderDetails[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, max: 32)
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, min: 1)
            try self.validate(self.identityProviderName, name: "identityProviderName", parent: name, pattern: "^[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case identityProviderDetails
            case identityProviderName
            case identityProviderType
        }
    }

    public struct UpdateIdentityProviderResponse: AWSDecodableShape {
        /// The identity provider.
        public let identityProvider: IdentityProvider

        public init(identityProvider: IdentityProvider) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider
        }
    }

    public struct UpdateNetworkSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "networkSettingsArn", location: .uri("networkSettingsArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the network settings.
        public let networkSettingsArn: String
        /// One or more security groups used to control access from streaming instances to your VPC.
        public let securityGroupIds: [String]?
        /// The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.
        public let subnetIds: [String]?
        /// The VPC that streaming instances will connect to.
        public let vpcId: String?

        public init(clientToken: String? = UpdateNetworkSettingsRequest.idempotencyToken(), networkSettingsArn: String, securityGroupIds: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.clientToken = clientToken
            self.networkSettingsArn = networkSettingsArn
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, max: 2048)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, min: 20)
            try self.validate(self.networkSettingsArn, name: "networkSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
            try self.securityGroupIds?.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 128)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^[\\w+\\-]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds?.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 32)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^subnet-([0-9a-f]{8}|[0-9a-f]{17})$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 3)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 2)
            try self.validate(self.vpcId, name: "vpcId", parent: name, max: 255)
            try self.validate(self.vpcId, name: "vpcId", parent: name, min: 1)
            try self.validate(self.vpcId, name: "vpcId", parent: name, pattern: "^vpc-[0-9a-z]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case securityGroupIds
            case subnetIds
            case vpcId
        }
    }

    public struct UpdateNetworkSettingsResponse: AWSDecodableShape {
        /// The network settings.
        public let networkSettings: NetworkSettings

        public init(networkSettings: NetworkSettings) {
            self.networkSettings = networkSettings
        }

        private enum CodingKeys: String, CodingKey {
            case networkSettings
        }
    }

    public struct UpdatePortalRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "portalArn", location: .uri("portalArn"))
        ]

        /// The name of the web portal. This is not visible to users who log into the web portal.
        public let displayName: String?
        /// The ARN of the web portal.
        public let portalArn: String

        public init(displayName: String? = nil, portalArn: String) {
            self.displayName = displayName
            self.portalArn = portalArn
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^.+$")
            try self.validate(self.portalArn, name: "portalArn", parent: name, max: 2048)
            try self.validate(self.portalArn, name: "portalArn", parent: name, min: 20)
            try self.validate(self.portalArn, name: "portalArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
        }
    }

    public struct UpdatePortalResponse: AWSDecodableShape {
        /// The web portal.
        public let portal: Portal?

        public init(portal: Portal? = nil) {
            self.portal = portal
        }

        private enum CodingKeys: String, CodingKey {
            case portal
        }
    }

    public struct UpdateTrustStoreRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "trustStoreArn", location: .uri("trustStoreArn"))
        ]

        /// A list of CA certificates to add to the trust store.
        public let certificatesToAdd: [AWSBase64Data]?
        /// A list of CA certificates to delete from a trust store.
        public let certificatesToDelete: [String]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(certificatesToAdd: [AWSBase64Data]? = nil, certificatesToDelete: [String]? = nil, clientToken: String? = UpdateTrustStoreRequest.idempotencyToken(), trustStoreArn: String) {
            self.certificatesToAdd = certificatesToAdd
            self.certificatesToDelete = certificatesToDelete
            self.clientToken = clientToken
            self.trustStoreArn = trustStoreArn
        }

        public func validate(name: String) throws {
            try self.certificatesToDelete?.forEach {
                try validate($0, name: "certificatesToDelete[]", parent: name, max: 64)
                try validate($0, name: "certificatesToDelete[]", parent: name, min: 64)
                try validate($0, name: "certificatesToDelete[]", parent: name, pattern: "^[A-Fa-f0-9]{64}$")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, max: 2048)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, min: 20)
            try self.validate(self.trustStoreArn, name: "trustStoreArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificatesToAdd
            case certificatesToDelete
            case clientToken
        }
    }

    public struct UpdateTrustStoreResponse: AWSDecodableShape {
        /// The ARN of the trust store.
        public let trustStoreArn: String

        public init(trustStoreArn: String) {
            self.trustStoreArn = trustStoreArn
        }

        private enum CodingKeys: String, CodingKey {
            case trustStoreArn
        }
    }

    public struct UpdateUserAccessLoggingSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userAccessLoggingSettingsArn", location: .uri("userAccessLoggingSettingsArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// The ARN of the Kinesis stream.
        public let kinesisStreamArn: String?
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(clientToken: String? = UpdateUserAccessLoggingSettingsRequest.idempotencyToken(), kinesisStreamArn: String? = nil, userAccessLoggingSettingsArn: String) {
            self.clientToken = clientToken
            self.kinesisStreamArn = kinesisStreamArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, max: 2048)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, min: 20)
            try self.validate(self.kinesisStreamArn, name: "kinesisStreamArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:kinesis:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:stream/.+")
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, max: 2048)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, min: 20)
            try self.validate(self.userAccessLoggingSettingsArn, name: "userAccessLoggingSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case kinesisStreamArn
        }
    }

    public struct UpdateUserAccessLoggingSettingsResponse: AWSDecodableShape {
        /// The user access logging settings.
        public let userAccessLoggingSettings: UserAccessLoggingSettings

        public init(userAccessLoggingSettings: UserAccessLoggingSettings) {
            self.userAccessLoggingSettings = userAccessLoggingSettings
        }

        private enum CodingKeys: String, CodingKey {
            case userAccessLoggingSettings
        }
    }

    public struct UpdateUserSettingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "userSettingsArn", location: .uri("userSettingsArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.  If you do not specify a client token, one is automatically generated by the AWS SDK.
        public let clientToken: String?
        /// Specifies whether the user can copy text from the streaming session to the local device.
        public let copyAllowed: EnabledType?
        /// The amount of time that a streaming session remains active after users disconnect.
        public let disconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can download files from the streaming session to the local device.
        public let downloadAllowed: EnabledType?
        /// The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.
        public let idleDisconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can paste text from the local device to the streaming session.
        public let pasteAllowed: EnabledType?
        /// Specifies whether the user can print to the local device.
        public let printAllowed: EnabledType?
        /// Specifies whether the user can upload files from the local device to the streaming session.
        public let uploadAllowed: EnabledType?
        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(clientToken: String? = UpdateUserSettingsRequest.idempotencyToken(), copyAllowed: EnabledType? = nil, disconnectTimeoutInMinutes: Int? = nil, downloadAllowed: EnabledType? = nil, idleDisconnectTimeoutInMinutes: Int? = nil, pasteAllowed: EnabledType? = nil, printAllowed: EnabledType? = nil, uploadAllowed: EnabledType? = nil, userSettingsArn: String) {
            self.clientToken = clientToken
            self.copyAllowed = copyAllowed
            self.disconnectTimeoutInMinutes = disconnectTimeoutInMinutes
            self.downloadAllowed = downloadAllowed
            self.idleDisconnectTimeoutInMinutes = idleDisconnectTimeoutInMinutes
            self.pasteAllowed = pasteAllowed
            self.printAllowed = printAllowed
            self.uploadAllowed = uploadAllowed
            self.userSettingsArn = userSettingsArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 512)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.disconnectTimeoutInMinutes, name: "disconnectTimeoutInMinutes", parent: name, max: 600)
            try self.validate(self.disconnectTimeoutInMinutes, name: "disconnectTimeoutInMinutes", parent: name, min: 1)
            try self.validate(self.idleDisconnectTimeoutInMinutes, name: "idleDisconnectTimeoutInMinutes", parent: name, max: 60)
            try self.validate(self.idleDisconnectTimeoutInMinutes, name: "idleDisconnectTimeoutInMinutes", parent: name, min: 0)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, max: 2048)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, min: 20)
            try self.validate(self.userSettingsArn, name: "userSettingsArn", parent: name, pattern: "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case copyAllowed
            case disconnectTimeoutInMinutes
            case downloadAllowed
            case idleDisconnectTimeoutInMinutes
            case pasteAllowed
            case printAllowed
            case uploadAllowed
        }
    }

    public struct UpdateUserSettingsResponse: AWSDecodableShape {
        /// The user settings.
        public let userSettings: UserSettings

        public init(userSettings: UserSettings) {
            self.userSettings = userSettings
        }

        private enum CodingKeys: String, CodingKey {
            case userSettings
        }
    }

    public struct UserAccessLoggingSettings: AWSDecodableShape {
        /// A list of web portal ARNs that this user access logging settings is associated with.
        public let associatedPortalArns: [String]?
        /// The ARN of the Kinesis stream.
        public let kinesisStreamArn: String?
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String

        public init(associatedPortalArns: [String]? = nil, kinesisStreamArn: String? = nil, userAccessLoggingSettingsArn: String) {
            self.associatedPortalArns = associatedPortalArns
            self.kinesisStreamArn = kinesisStreamArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case associatedPortalArns
            case kinesisStreamArn
            case userAccessLoggingSettingsArn
        }
    }

    public struct UserAccessLoggingSettingsSummary: AWSDecodableShape {
        /// The ARN of the Kinesis stream.
        public let kinesisStreamArn: String?
        /// The ARN of the user access logging settings.
        public let userAccessLoggingSettingsArn: String?

        public init(kinesisStreamArn: String? = nil, userAccessLoggingSettingsArn: String? = nil) {
            self.kinesisStreamArn = kinesisStreamArn
            self.userAccessLoggingSettingsArn = userAccessLoggingSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case kinesisStreamArn
            case userAccessLoggingSettingsArn
        }
    }

    public struct UserSettings: AWSDecodableShape {
        /// A list of web portal ARNs that this user settings is associated with.
        public let associatedPortalArns: [String]?
        /// Specifies whether the user can copy text from the streaming session to the local device.
        public let copyAllowed: EnabledType?
        /// The amount of time that a streaming session remains active after users disconnect.
        public let disconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can download files from the streaming session to the local device.
        public let downloadAllowed: EnabledType?
        /// The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.
        public let idleDisconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can paste text from the local device to the streaming session.
        public let pasteAllowed: EnabledType?
        /// Specifies whether the user can print to the local device.
        public let printAllowed: EnabledType?
        /// Specifies whether the user can upload files from the local device to the streaming session.
        public let uploadAllowed: EnabledType?
        /// The ARN of the user settings.
        public let userSettingsArn: String

        public init(associatedPortalArns: [String]? = nil, copyAllowed: EnabledType? = nil, disconnectTimeoutInMinutes: Int? = nil, downloadAllowed: EnabledType? = nil, idleDisconnectTimeoutInMinutes: Int? = nil, pasteAllowed: EnabledType? = nil, printAllowed: EnabledType? = nil, uploadAllowed: EnabledType? = nil, userSettingsArn: String) {
            self.associatedPortalArns = associatedPortalArns
            self.copyAllowed = copyAllowed
            self.disconnectTimeoutInMinutes = disconnectTimeoutInMinutes
            self.downloadAllowed = downloadAllowed
            self.idleDisconnectTimeoutInMinutes = idleDisconnectTimeoutInMinutes
            self.pasteAllowed = pasteAllowed
            self.printAllowed = printAllowed
            self.uploadAllowed = uploadAllowed
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case associatedPortalArns
            case copyAllowed
            case disconnectTimeoutInMinutes
            case downloadAllowed
            case idleDisconnectTimeoutInMinutes
            case pasteAllowed
            case printAllowed
            case uploadAllowed
            case userSettingsArn
        }
    }

    public struct UserSettingsSummary: AWSDecodableShape {
        /// Specifies whether the user can copy text from the streaming session to the local device.
        public let copyAllowed: EnabledType?
        /// The amount of time that a streaming session remains active after users disconnect.
        public let disconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can download files from the streaming session to the local device.
        public let downloadAllowed: EnabledType?
        /// The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.
        public let idleDisconnectTimeoutInMinutes: Int?
        /// Specifies whether the user can paste text from the local device to the streaming session.
        public let pasteAllowed: EnabledType?
        /// Specifies whether the user can print to the local device.
        public let printAllowed: EnabledType?
        /// Specifies whether the user can upload files from the local device to the streaming session.
        public let uploadAllowed: EnabledType?
        /// The ARN of the user settings.
        public let userSettingsArn: String?

        public init(copyAllowed: EnabledType? = nil, disconnectTimeoutInMinutes: Int? = nil, downloadAllowed: EnabledType? = nil, idleDisconnectTimeoutInMinutes: Int? = nil, pasteAllowed: EnabledType? = nil, printAllowed: EnabledType? = nil, uploadAllowed: EnabledType? = nil, userSettingsArn: String? = nil) {
            self.copyAllowed = copyAllowed
            self.disconnectTimeoutInMinutes = disconnectTimeoutInMinutes
            self.downloadAllowed = downloadAllowed
            self.idleDisconnectTimeoutInMinutes = idleDisconnectTimeoutInMinutes
            self.pasteAllowed = pasteAllowed
            self.printAllowed = printAllowed
            self.uploadAllowed = uploadAllowed
            self.userSettingsArn = userSettingsArn
        }

        private enum CodingKeys: String, CodingKey {
            case copyAllowed
            case disconnectTimeoutInMinutes
            case downloadAllowed
            case idleDisconnectTimeoutInMinutes
            case pasteAllowed
            case printAllowed
            case uploadAllowed
            case userSettingsArn
        }
    }
}

// MARK: - Errors

/// Error enum for WorkSpacesWeb
public struct WorkSpacesWebErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case tooManyTagsException = "TooManyTagsException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize WorkSpacesWeb
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Access is denied.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// There is a conflict.
    public static var conflictException: Self { .init(.conflictException) }
    /// There is an internal server error.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The resource cannot be found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The service quota has been exceeded.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// There is a throttling error.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// There are too many tags.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// There is a validation error.
    public static var validationException: Self { .init(.validationException) }
}

extension WorkSpacesWebErrorType: Equatable {
    public static func == (lhs: WorkSpacesWebErrorType, rhs: WorkSpacesWebErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension WorkSpacesWebErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
